<template>
  <header class="mc-header">
    <div class="mc-header-left">
      <img v-if="logoImg" :src="logoImg" class="mc-logo" />
      <h1 v-if="title" class="mc-title">{{ title }}</h1>
    </div>
    <div class="mc-header-right">
      <slot name="operationArea"></slot>
    </div>
  </header>
</template>

<script setup lang="ts">
defineProps({
  logoImg: {
    type: String,
    default: '',
  },
  title: {
    type: String,
    default: '',
  },
});
</script>

<style scoped>
.mc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--devui-line, #dfe1e6);
}

.mc-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mc-logo {
  width: 32px;
  height: 32px;
}

.mc-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--devui-text, #252b3a);
}
</style> 